package com.example.app_struct

import android.os.Bundle
import com.david.core.utils.MMKVUtil
import com.example.app_struct.base.BaseActivity
import com.example.app_struct.base.BaseViewModel
import com.example.app_struct.databinding.ActivityMainBinding

class MainActivity : BaseActivity<BaseViewModel, ActivityMainBinding>() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        //setBinding(inflate1<ActivityMainBinding>())



        //setContentView(R.layout.activity_main)
        //
        //Glide.with(this).load("https://globalimg.sucai999.com/preimg/DBC456/700/DBC456/99/9824edde7a9b6425fcc078cf809fd089.jpg").into(findViewById(R.id.img))
        //StatusBarUtil.setColor(this, Color.BLACK)
        //
        //ActivityMainBinding.inflate(layoutInflater)
    }

    override fun initBinding(): ActivityMainBinding {
        return ActivityMainBinding.inflate(layoutInflater)
    }


    override fun initView() {
        binding.refresh.setOnRefreshListener {
            binding.refresh.postDelayed({
                binding.refresh.finishRefresh()
            }, 1000)
        }
    }

    override fun initData() {
        MMKVUtil.getString("haha")
    }
}
